home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / intmail2 / httpmain.pas < prev    next >
Pascal/Delphi Source File  |  1999-07-29  |  709b  |  38 lines

  1. unit httpmain;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, Mssocket, mshttp;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     URLEdit: TEdit;
  12.     GetButton: TButton;
  13.     ResultsMemo: TMemo;
  14.     msHTTPClient1: TmsHTTPClient;
  15.     procedure GetButtonClick(Sender: TObject);
  16.   private
  17.     { Private declarations }
  18.   public
  19.     { Public declarations }
  20.   end;
  21.  
  22. var
  23.   Form1: TForm1;
  24.  
  25. implementation
  26.  
  27. {$R *.DFM}
  28.  
  29. procedure TForm1.GetButtonClick(Sender: TObject);
  30. begin
  31.   msHTTPClient1.URL:=URLEdit.Text;
  32.   msHTTPClient1.Get;
  33.   msHTTPClient1.InStream.Position:=0;
  34.   ResultsMemo.Lines.LoadFromStream(msHTTPClient1.InStream);
  35. end;
  36.  
  37. end.
  38.